<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>    
<!-- 和别的页面不一样,这里必须是xhtml的doctype -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>四管检测管理系统</title>
    <link rel="stylesheet" type="text/css" href="css/login.css"></link>
	<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="js/jquery.validate.min.js"></script>
	<script type="text/javascript" src="js/messages_cn.js"></script>
	<script type="text/javascript">
		
	$(function() {
	
		if(self!=top){
		    window.top.location = "login.jsp";
		}
	 
		// highlight 
		var elements = $("input[type!='submit'], textarea, select");
		elements.focus(function(){
			$(this).parents('li').addClass('highlight');
		});
		elements.blur(function(){
			$(this).parents('li').removeClass('highlight');
		});
		$("#login").validate();
		
		
		
	});
	</script>
  </head>
  
  <body>
    <div id="page">
		<div id="header">
			<h1><img class="logo" src="images/loginlogo.jpg"/></h1>
		</div>
		<div id="content">
			<p id="status"></p>
			<form action="login.do" method="post" id="login">
				<fieldset>
					<legend><s:message code="admin.login.userlogin"/></legend>
					<ul>
						<li>
							<label for="userName"><span class="required" ><s:message code="admin.login.userName"/></span></label>
							<input id="userName"  name="userName" type="text" class="text required" value="admin" title="<s:message code="admin.login.InputUserName"/>" />
						</li>
						
						<li>
							<label for="password"><span class="required"><s:message code="admin.login.password"/></span></label>
							<input id="password" name="password" type="password" class="text required" value="admin" title="<s:message code="admin.login.TypeUserPassword"/>"  />
						</li>
						<% if(request.getAttribute("error")!=null){ %>
						<li>
							<label class="error" style="display: inline;border-bottom: 0px;">${requestScope.error}</label>
						</li>
						<%} %>
					</ul>
				</fieldset>
				<fieldset class="submit">
					<input type="submit" class="button" value="<s:message code="admin.login.register"/>" />
				</fieldset>
				
				<div class="clear"></div>
			</form>
			
		</div>
	</div>
  </body>
</html>
